<?php


abstract class BaseMember extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $name;


	
	protected $surname;


	
	protected $education;


	
	protected $employee;


	
	protected $position;


	
	protected $languages;


	
	protected $previous_politics;


	
	protected $comitee;


	
	protected $comitee_add;


	
	protected $organizational;


	
	protected $organizational_add;


	
	protected $help;


	
	protected $help_add;


	
	protected $elections;


	
	protected $elections_add;


	
	protected $other;


	
	protected $email;


	
	protected $phone_home;


	
	protected $phone_work;


	
	protected $phone_cell;


	
	protected $fax;


	
	protected $pers_num;


	
	protected $address;


	
	protected $updated_at;


	
	protected $created_at;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getName()
	{

		return $this->name;
	}

	
	public function getSurname()
	{

		return $this->surname;
	}

	
	public function getEducation()
	{

		return $this->education;
	}

	
	public function getEmployee()
	{

		return $this->employee;
	}

	
	public function getPosition()
	{

		return $this->position;
	}

	
	public function getLanguages()
	{

		return $this->languages;
	}

	
	public function getPreviousPolitics()
	{

		return $this->previous_politics;
	}

	
	public function getComitee()
	{

		return $this->comitee;
	}

	
	public function getComiteeAdd()
	{

		return $this->comitee_add;
	}

	
	public function getOrganizational()
	{

		return $this->organizational;
	}

	
	public function getOrganizationalAdd()
	{

		return $this->organizational_add;
	}

	
	public function getHelp()
	{

		return $this->help;
	}

	
	public function getHelpAdd()
	{

		return $this->help_add;
	}

	
	public function getElections()
	{

		return $this->elections;
	}

	
	public function getElectionsAdd()
	{

		return $this->elections_add;
	}

	
	public function getOther()
	{

		return $this->other;
	}

	
	public function getEmail()
	{

		return $this->email;
	}

	
	public function getPhoneHome()
	{

		return $this->phone_home;
	}

	
	public function getPhoneWork()
	{

		return $this->phone_work;
	}

	
	public function getPhoneCell()
	{

		return $this->phone_cell;
	}

	
	public function getFax()
	{

		return $this->fax;
	}

	
	public function getPersNum()
	{

		return $this->pers_num;
	}

	
	public function getAddress()
	{

		return $this->address;
	}

	
	public function getUpdatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->updated_at === null || $this->updated_at === '') {
			return null;
		} elseif (!is_int($this->updated_at)) {
						$ts = strtotime($this->updated_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [updated_at] as date/time value: " . var_export($this->updated_at, true));
			}
		} else {
			$ts = $this->updated_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getCreatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->created_at === null || $this->created_at === '') {
			return null;
		} elseif (!is_int($this->created_at)) {
						$ts = strtotime($this->created_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true));
			}
		} else {
			$ts = $this->created_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function setId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = MemberPeer::ID;
		}

	} 
	
	public function setName($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->name !== $v) {
			$this->name = $v;
			$this->modifiedColumns[] = MemberPeer::NAME;
		}

	} 
	
	public function setSurname($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->surname !== $v) {
			$this->surname = $v;
			$this->modifiedColumns[] = MemberPeer::SURNAME;
		}

	} 
	
	public function setEducation($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->education !== $v) {
			$this->education = $v;
			$this->modifiedColumns[] = MemberPeer::EDUCATION;
		}

	} 
	
	public function setEmployee($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->employee !== $v) {
			$this->employee = $v;
			$this->modifiedColumns[] = MemberPeer::EMPLOYEE;
		}

	} 
	
	public function setPosition($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->position !== $v) {
			$this->position = $v;
			$this->modifiedColumns[] = MemberPeer::POSITION;
		}

	} 
	
	public function setLanguages($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->languages !== $v) {
			$this->languages = $v;
			$this->modifiedColumns[] = MemberPeer::LANGUAGES;
		}

	} 
	
	public function setPreviousPolitics($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->previous_politics !== $v) {
			$this->previous_politics = $v;
			$this->modifiedColumns[] = MemberPeer::PREVIOUS_POLITICS;
		}

	} 
	
	public function setComitee($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->comitee !== $v) {
			$this->comitee = $v;
			$this->modifiedColumns[] = MemberPeer::COMITEE;
		}

	} 
	
	public function setComiteeAdd($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->comitee_add !== $v) {
			$this->comitee_add = $v;
			$this->modifiedColumns[] = MemberPeer::COMITEE_ADD;
		}

	} 
	
	public function setOrganizational($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->organizational !== $v) {
			$this->organizational = $v;
			$this->modifiedColumns[] = MemberPeer::ORGANIZATIONAL;
		}

	} 
	
	public function setOrganizationalAdd($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->organizational_add !== $v) {
			$this->organizational_add = $v;
			$this->modifiedColumns[] = MemberPeer::ORGANIZATIONAL_ADD;
		}

	} 
	
	public function setHelp($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->help !== $v) {
			$this->help = $v;
			$this->modifiedColumns[] = MemberPeer::HELP;
		}

	} 
	
	public function setHelpAdd($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->help_add !== $v) {
			$this->help_add = $v;
			$this->modifiedColumns[] = MemberPeer::HELP_ADD;
		}

	} 
	
	public function setElections($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->elections !== $v) {
			$this->elections = $v;
			$this->modifiedColumns[] = MemberPeer::ELECTIONS;
		}

	} 
	
	public function setElectionsAdd($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->elections_add !== $v) {
			$this->elections_add = $v;
			$this->modifiedColumns[] = MemberPeer::ELECTIONS_ADD;
		}

	} 
	
	public function setOther($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->other !== $v) {
			$this->other = $v;
			$this->modifiedColumns[] = MemberPeer::OTHER;
		}

	} 
	
	public function setEmail($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->email !== $v) {
			$this->email = $v;
			$this->modifiedColumns[] = MemberPeer::EMAIL;
		}

	} 
	
	public function setPhoneHome($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->phone_home !== $v) {
			$this->phone_home = $v;
			$this->modifiedColumns[] = MemberPeer::PHONE_HOME;
		}

	} 
	
	public function setPhoneWork($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->phone_work !== $v) {
			$this->phone_work = $v;
			$this->modifiedColumns[] = MemberPeer::PHONE_WORK;
		}

	} 
	
	public function setPhoneCell($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->phone_cell !== $v) {
			$this->phone_cell = $v;
			$this->modifiedColumns[] = MemberPeer::PHONE_CELL;
		}

	} 
	
	public function setFax($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fax !== $v) {
			$this->fax = $v;
			$this->modifiedColumns[] = MemberPeer::FAX;
		}

	} 
	
	public function setPersNum($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->pers_num !== $v) {
			$this->pers_num = $v;
			$this->modifiedColumns[] = MemberPeer::PERS_NUM;
		}

	} 
	
	public function setAddress($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->address !== $v) {
			$this->address = $v;
			$this->modifiedColumns[] = MemberPeer::ADDRESS;
		}

	} 
	
	public function setUpdatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [updated_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->updated_at !== $ts) {
			$this->updated_at = $ts;
			$this->modifiedColumns[] = MemberPeer::UPDATED_AT;
		}

	} 
	
	public function setCreatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->created_at !== $ts) {
			$this->created_at = $ts;
			$this->modifiedColumns[] = MemberPeer::CREATED_AT;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->name = $rs->getString($startcol + 1);

			$this->surname = $rs->getString($startcol + 2);

			$this->education = $rs->getString($startcol + 3);

			$this->employee = $rs->getString($startcol + 4);

			$this->position = $rs->getString($startcol + 5);

			$this->languages = $rs->getString($startcol + 6);

			$this->previous_politics = $rs->getString($startcol + 7);

			$this->comitee = $rs->getString($startcol + 8);

			$this->comitee_add = $rs->getString($startcol + 9);

			$this->organizational = $rs->getString($startcol + 10);

			$this->organizational_add = $rs->getString($startcol + 11);

			$this->help = $rs->getString($startcol + 12);

			$this->help_add = $rs->getString($startcol + 13);

			$this->elections = $rs->getString($startcol + 14);

			$this->elections_add = $rs->getString($startcol + 15);

			$this->other = $rs->getString($startcol + 16);

			$this->email = $rs->getString($startcol + 17);

			$this->phone_home = $rs->getString($startcol + 18);

			$this->phone_work = $rs->getString($startcol + 19);

			$this->phone_cell = $rs->getString($startcol + 20);

			$this->fax = $rs->getString($startcol + 21);

			$this->pers_num = $rs->getString($startcol + 22);

			$this->address = $rs->getString($startcol + 23);

			$this->updated_at = $rs->getTimestamp($startcol + 24, null);

			$this->created_at = $rs->getTimestamp($startcol + 25, null);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 26; 
		} catch (Exception $e) {
			throw new PropelException("Error populating Member object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(MemberPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			MemberPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
    if ($this->isModified() && !$this->isColumnModified(MemberPeer::UPDATED_AT))
    {
      $this->setUpdatedAt(time());
    }

    if ($this->isNew() && !$this->isColumnModified(MemberPeer::CREATED_AT))
    {
      $this->setCreatedAt(time());
    }

		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(MemberPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = MemberPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += MemberPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = MemberPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = MemberPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getName();
				break;
			case 2:
				return $this->getSurname();
				break;
			case 3:
				return $this->getEducation();
				break;
			case 4:
				return $this->getEmployee();
				break;
			case 5:
				return $this->getPosition();
				break;
			case 6:
				return $this->getLanguages();
				break;
			case 7:
				return $this->getPreviousPolitics();
				break;
			case 8:
				return $this->getComitee();
				break;
			case 9:
				return $this->getComiteeAdd();
				break;
			case 10:
				return $this->getOrganizational();
				break;
			case 11:
				return $this->getOrganizationalAdd();
				break;
			case 12:
				return $this->getHelp();
				break;
			case 13:
				return $this->getHelpAdd();
				break;
			case 14:
				return $this->getElections();
				break;
			case 15:
				return $this->getElectionsAdd();
				break;
			case 16:
				return $this->getOther();
				break;
			case 17:
				return $this->getEmail();
				break;
			case 18:
				return $this->getPhoneHome();
				break;
			case 19:
				return $this->getPhoneWork();
				break;
			case 20:
				return $this->getPhoneCell();
				break;
			case 21:
				return $this->getFax();
				break;
			case 22:
				return $this->getPersNum();
				break;
			case 23:
				return $this->getAddress();
				break;
			case 24:
				return $this->getUpdatedAt();
				break;
			case 25:
				return $this->getCreatedAt();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = MemberPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getName(),
			$keys[2] => $this->getSurname(),
			$keys[3] => $this->getEducation(),
			$keys[4] => $this->getEmployee(),
			$keys[5] => $this->getPosition(),
			$keys[6] => $this->getLanguages(),
			$keys[7] => $this->getPreviousPolitics(),
			$keys[8] => $this->getComitee(),
			$keys[9] => $this->getComiteeAdd(),
			$keys[10] => $this->getOrganizational(),
			$keys[11] => $this->getOrganizationalAdd(),
			$keys[12] => $this->getHelp(),
			$keys[13] => $this->getHelpAdd(),
			$keys[14] => $this->getElections(),
			$keys[15] => $this->getElectionsAdd(),
			$keys[16] => $this->getOther(),
			$keys[17] => $this->getEmail(),
			$keys[18] => $this->getPhoneHome(),
			$keys[19] => $this->getPhoneWork(),
			$keys[20] => $this->getPhoneCell(),
			$keys[21] => $this->getFax(),
			$keys[22] => $this->getPersNum(),
			$keys[23] => $this->getAddress(),
			$keys[24] => $this->getUpdatedAt(),
			$keys[25] => $this->getCreatedAt(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = MemberPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setName($value);
				break;
			case 2:
				$this->setSurname($value);
				break;
			case 3:
				$this->setEducation($value);
				break;
			case 4:
				$this->setEmployee($value);
				break;
			case 5:
				$this->setPosition($value);
				break;
			case 6:
				$this->setLanguages($value);
				break;
			case 7:
				$this->setPreviousPolitics($value);
				break;
			case 8:
				$this->setComitee($value);
				break;
			case 9:
				$this->setComiteeAdd($value);
				break;
			case 10:
				$this->setOrganizational($value);
				break;
			case 11:
				$this->setOrganizationalAdd($value);
				break;
			case 12:
				$this->setHelp($value);
				break;
			case 13:
				$this->setHelpAdd($value);
				break;
			case 14:
				$this->setElections($value);
				break;
			case 15:
				$this->setElectionsAdd($value);
				break;
			case 16:
				$this->setOther($value);
				break;
			case 17:
				$this->setEmail($value);
				break;
			case 18:
				$this->setPhoneHome($value);
				break;
			case 19:
				$this->setPhoneWork($value);
				break;
			case 20:
				$this->setPhoneCell($value);
				break;
			case 21:
				$this->setFax($value);
				break;
			case 22:
				$this->setPersNum($value);
				break;
			case 23:
				$this->setAddress($value);
				break;
			case 24:
				$this->setUpdatedAt($value);
				break;
			case 25:
				$this->setCreatedAt($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = MemberPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setSurname($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setEducation($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setEmployee($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setLanguages($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setPreviousPolitics($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setComitee($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setComiteeAdd($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setOrganizational($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setOrganizationalAdd($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setHelp($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setHelpAdd($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setElections($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setElectionsAdd($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setOther($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setEmail($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setPhoneHome($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setPhoneWork($arr[$keys[19]]);
		if (array_key_exists($keys[20], $arr)) $this->setPhoneCell($arr[$keys[20]]);
		if (array_key_exists($keys[21], $arr)) $this->setFax($arr[$keys[21]]);
		if (array_key_exists($keys[22], $arr)) $this->setPersNum($arr[$keys[22]]);
		if (array_key_exists($keys[23], $arr)) $this->setAddress($arr[$keys[23]]);
		if (array_key_exists($keys[24], $arr)) $this->setUpdatedAt($arr[$keys[24]]);
		if (array_key_exists($keys[25], $arr)) $this->setCreatedAt($arr[$keys[25]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(MemberPeer::DATABASE_NAME);

		if ($this->isColumnModified(MemberPeer::ID)) $criteria->add(MemberPeer::ID, $this->id);
		if ($this->isColumnModified(MemberPeer::NAME)) $criteria->add(MemberPeer::NAME, $this->name);
		if ($this->isColumnModified(MemberPeer::SURNAME)) $criteria->add(MemberPeer::SURNAME, $this->surname);
		if ($this->isColumnModified(MemberPeer::EDUCATION)) $criteria->add(MemberPeer::EDUCATION, $this->education);
		if ($this->isColumnModified(MemberPeer::EMPLOYEE)) $criteria->add(MemberPeer::EMPLOYEE, $this->employee);
		if ($this->isColumnModified(MemberPeer::POSITION)) $criteria->add(MemberPeer::POSITION, $this->position);
		if ($this->isColumnModified(MemberPeer::LANGUAGES)) $criteria->add(MemberPeer::LANGUAGES, $this->languages);
		if ($this->isColumnModified(MemberPeer::PREVIOUS_POLITICS)) $criteria->add(MemberPeer::PREVIOUS_POLITICS, $this->previous_politics);
		if ($this->isColumnModified(MemberPeer::COMITEE)) $criteria->add(MemberPeer::COMITEE, $this->comitee);
		if ($this->isColumnModified(MemberPeer::COMITEE_ADD)) $criteria->add(MemberPeer::COMITEE_ADD, $this->comitee_add);
		if ($this->isColumnModified(MemberPeer::ORGANIZATIONAL)) $criteria->add(MemberPeer::ORGANIZATIONAL, $this->organizational);
		if ($this->isColumnModified(MemberPeer::ORGANIZATIONAL_ADD)) $criteria->add(MemberPeer::ORGANIZATIONAL_ADD, $this->organizational_add);
		if ($this->isColumnModified(MemberPeer::HELP)) $criteria->add(MemberPeer::HELP, $this->help);
		if ($this->isColumnModified(MemberPeer::HELP_ADD)) $criteria->add(MemberPeer::HELP_ADD, $this->help_add);
		if ($this->isColumnModified(MemberPeer::ELECTIONS)) $criteria->add(MemberPeer::ELECTIONS, $this->elections);
		if ($this->isColumnModified(MemberPeer::ELECTIONS_ADD)) $criteria->add(MemberPeer::ELECTIONS_ADD, $this->elections_add);
		if ($this->isColumnModified(MemberPeer::OTHER)) $criteria->add(MemberPeer::OTHER, $this->other);
		if ($this->isColumnModified(MemberPeer::EMAIL)) $criteria->add(MemberPeer::EMAIL, $this->email);
		if ($this->isColumnModified(MemberPeer::PHONE_HOME)) $criteria->add(MemberPeer::PHONE_HOME, $this->phone_home);
		if ($this->isColumnModified(MemberPeer::PHONE_WORK)) $criteria->add(MemberPeer::PHONE_WORK, $this->phone_work);
		if ($this->isColumnModified(MemberPeer::PHONE_CELL)) $criteria->add(MemberPeer::PHONE_CELL, $this->phone_cell);
		if ($this->isColumnModified(MemberPeer::FAX)) $criteria->add(MemberPeer::FAX, $this->fax);
		if ($this->isColumnModified(MemberPeer::PERS_NUM)) $criteria->add(MemberPeer::PERS_NUM, $this->pers_num);
		if ($this->isColumnModified(MemberPeer::ADDRESS)) $criteria->add(MemberPeer::ADDRESS, $this->address);
		if ($this->isColumnModified(MemberPeer::UPDATED_AT)) $criteria->add(MemberPeer::UPDATED_AT, $this->updated_at);
		if ($this->isColumnModified(MemberPeer::CREATED_AT)) $criteria->add(MemberPeer::CREATED_AT, $this->created_at);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(MemberPeer::DATABASE_NAME);

		$criteria->add(MemberPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setName($this->name);

		$copyObj->setSurname($this->surname);

		$copyObj->setEducation($this->education);

		$copyObj->setEmployee($this->employee);

		$copyObj->setPosition($this->position);

		$copyObj->setLanguages($this->languages);

		$copyObj->setPreviousPolitics($this->previous_politics);

		$copyObj->setComitee($this->comitee);

		$copyObj->setComiteeAdd($this->comitee_add);

		$copyObj->setOrganizational($this->organizational);

		$copyObj->setOrganizationalAdd($this->organizational_add);

		$copyObj->setHelp($this->help);

		$copyObj->setHelpAdd($this->help_add);

		$copyObj->setElections($this->elections);

		$copyObj->setElectionsAdd($this->elections_add);

		$copyObj->setOther($this->other);

		$copyObj->setEmail($this->email);

		$copyObj->setPhoneHome($this->phone_home);

		$copyObj->setPhoneWork($this->phone_work);

		$copyObj->setPhoneCell($this->phone_cell);

		$copyObj->setFax($this->fax);

		$copyObj->setPersNum($this->pers_num);

		$copyObj->setAddress($this->address);

		$copyObj->setUpdatedAt($this->updated_at);

		$copyObj->setCreatedAt($this->created_at);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new MemberPeer();
		}
		return self::$peer;
	}

} 